function downloadFile( url ){
     wx.downloadFile({
        url: 'url',
        filePath: 'filePath',
        header: header,
        timeout: 0,
        success: (result) => {

            if(result.statusCode==200){

                wx.saveVideoToPhotosAlbum({
                  filePath: result.tempFilePath,
                  success:function(){

                  },
                  fail:function(){
                      console.log("文件保存失败");
                  }

                })

            }




        },
        fail: (res) => {},
        complete: (res) => {},
    })
}



var file = {}
file.downloadFile = downloadFile;

module.exports = file;